<template>
	<div class="">
		<div class="zzc" v-if="showzzc" @click="close"></div>
		<div class="container">
			<div class="search_box" style="flex-wrap: wrap;">
				<input type="text" autocomplete="off" v-model="word2" class="form-control search_inp"
					placeholder="这里输入项目名称">

				<el-select v-model="value2" placeholder="状态" @change="page=1">
					<el-option v-for="item in options2" :key="item.id" :label="item.name" :value="item.id">
					</el-option>
				</el-select>

				<div class="input-cont" style="margin-left:10px;width: 110px;margin-bottom: 20px;">
					<input type="text" class="form-control" readonly v-model="susername" placeholder="项目经理">

					<img src="@assets/images/close.png" class="clears" alt="" v-if="susername"
						@click="susername = '';principalId=''">
					<span class="iconfont icon-list" data-toggle="modal" data-target="#keshi"
						@click="utype='search';openuseralert()"></span>
				</div>

				<el-date-picker prefix-icon='none' style="margin-left: 10px;width: 150px;margin-bottom: 20px;"
					v-model="byDate" @change="changedate(1)" type="date" value-format="timestamp" placeholder="开始时间选择">
				</el-date-picker>
				<el-date-picker prefix-icon='none' style="margin-left: 10px;width: 150px;margin-bottom: 20px;"
					v-model="byDate2" @change="changedate(2)" type="date" value-format="timestamp" placeholder="结束时间选择">
				</el-date-picker>


				<div class="sea_btn sear_btns" style="margin-bottom: 20px;"
					@click="page=1;naes=word2;value2s=value2;byDates=byDate;byDate2s=byDate2;principalIds=principalId;getlist()">
					<img src="@assets/images/search.png" alt="">
					查询
				</div>
				<!-- v-if="$permissions.indexOf(13)  != -1" -->
				<!-- <div class="add_btn sear_btns" @click="openadd" style="margin-bottom: 20px;">
					<img src="@assets/images/add.png" alt="">
					新增
				</div> -->
				<div class="del_btn sear_btns" style="margin-bottom: 20px;" @click="delopen(0)"
					v-if="$permissions.indexOf(168)  != -1">
					<img src="@assets/images/del.png" alt="">
					删除
				</div>
				<div class="add_btn sear_btns rw" @click="openadd(value5)" v-if="$permissions.indexOf(165)  != -1">
					<img src="@assets/images/add.png" alt="">
					<div class="rwadd">项目</div>
					<el-select v-model="value5" placeholder="" class="btnsele" @change="openselect">
						<el-option class="rws" v-for="item in options5" :key="item.id" :label="item.name"
							:value="item.id">
						</el-option>
					</el-select>
				</div>
			</div>
			<div class="table-responsive">
				<h2 class="tcent" v-if="list.length ==0">暂时没有数据</h2>
				<table class="table table-hover" v-else>
					<tr>
						<th style="width: 50px;">
							<input type="checkbox" @change="changeall" v-model="choseall" name="all" id="arw"><label
								for="arw"></label>
						</th>
						<th>项目名称</th>
						<th>项目描述</th>
						<th>项目进度</th>
						<th>开始时间</th>
						<th>结束时间</th>
						<th>项目经理</th>
						<th>项目成员</th>
						<th>项目状态</th>
						<th class="tcent">操作</th>
					</tr>
					<tr v-for="item,index in list">
						<td style="width: 50px;">
							<input type="checkbox" v-model="item.chosesf" @change="chosechange" name="chose"
								:id="'rw'+item.id"><label :for="'rw'+item.id"></label>
						</td>
						<td style="max-width: 300px;">
							<span style="cursor: pointer;color:#4286f5"
								@click="id=item.id;showinfo=true">{{item.xmName}}</span>
							<img class="foucs" src="@assets/images/star.png" v-if="item.isAttention" alt=""
								@click="changeact(index)">
							<img class="foucs" src="@assets/images/emptystar.png" v-else alt=""
								@click="changeact(index)">
						</td>
						<!--  -->
						<td style="max-width: 300px;">{{item.xmDescription}}</td>
						<td>{{item.process}}</td>
						<td>{{item.beginDate}}</td>
						<td>{{item.finishDate}}</td>
						<td>{{item.principalName}}</td>
						<td style="max-width: 300px;">
							<span style="color: #333;margin-right: 10px;"
								v-for="item2 in item.members">{{item2.realName}}</span>
						</td>

						<td style="min-width: 80px;">{{item.state}}</td>
						<td class="tcent">

							<a href="javascript:;" class=" btn-blue btns" @click="id=item.id;showinfo=true">查看</a>
							<a href="javascript:;" class=" btn-green btns" v-if="$permissions.indexOf(167)  != -1"
								@click="edit(index)">编辑</a>

						</td>
					</tr>

				</table>

				<div class="page_box">
					<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
						:current-page="page" :page-sizes="[10, 30, 60, 100]" :page-size="limit"
						layout="total, sizes, prev, pager, next, jumper" :total="inglen">
					</el-pagination>
				</div>

			</div>


		</div>


		<!--新增项目-->
		<div :class="showadd?'modal in fade':'modal fade'" tabindex="-1" role="dialog" id="keshi"
			:style="showadd?'display: block;z-index:200;':'z-index:200;'">
			<div class="cent w600" style="justify-content: center;width: 860px !important;">
				<div class="modal-dialog" role="document" style="width: 100%;height: 610px;">
					<div class="modal-content">
						<div class="modal-header tit">
							<em></em> {{type == 'add'?'新增项目':'修改项目'}}
							<div class="right" @click="closeadd">
								<button type="button" class="close" data-dismiss="modal" aria-label="Close"
									style="line-height: normal;"><span class="iconfont icon-cha"
										aria-hidden="true"></span> </button>
							</div>
						</div>
						<!--表单-->
						<div class="modal-body h100 search-cont" style="padding: 15px 27px;height: 478px;">
							<div class="sublist">
								<div class="subli">
									<div class="subli_left">
										<label class="subl"><em class="red">*</em>项目名称</label>
										<div class="input-cont">
											<input type="text" class="form-control" v-model="info.xmName"
												placeholder="输入项目名称">
										</div>
									</div>
									<div class="subli_left">
										<label class="subl">项目状态</label>
										<div class="input-cont">
											<el-select v-model="value3" placeholder="选择状态">
												<el-option v-for="item in options6" :key="item.id" :label="item.name"
													:value="item.id">
												</el-option>
											</el-select>
										</div>
									</div>
								</div>

								<div class="subli">
									<div class="subli_left">
										<label class="subl"><em class="red">*</em>预计开始日期</label>
										<div class="input-cont">
											<el-date-picker v-model="info.beginDate" @change="changedate(1)" type="date"
												placeholder="开始日期" value-format="timestamp">
											</el-date-picker>
										</div>
									</div>
									<div class="subli_left">
										<label class="subl"><em class="red">*</em>预计结束日期</label>
										<div class="input-cont">
											<el-date-picker v-model="info.finishDate" @change="changedate(2)"
												type="date" placeholder="结束日期" value-format="timestamp">
											</el-date-picker>
										</div>
									</div>
								</div>

								<div class="subli">
									<div class="sublia">
										<label class="subl">项目概况</label>
										<div class="input-cont">
											<textarea name="" v-model="xmDescription" id="" maxlength="1000"
												placeholder="请输入项目概况"></textarea>
											<div class="snum">{{xmDescription.length}}/1000</div>
										</div>
									</div>
								</div>

								<div class="subli">
									<div class="subli_left">
										<label class="subl"><em class="red">*</em>项目经理</label>
										<div class="input-cont">
											<el-autocomplete popper-class="my-autocomplete" :trigger-on-focus="false"
												@change="utype='xm';info.principalId = '';isclick1=false"
												v-model="uname" value-key="realName" :fetch-suggestions="querySearch_xm"
												placeholder="请选择项目经理" @select="handleSelect_u">
												<template slot-scope="{ item }">
													<div class="tab_tr">
														<div class="tab_td">{{ item.userName }}</div>
														<div class="tab_td">{{ item.realName }}</div>
														<div class="tab_td">{{ item.departName }}</div>
														<div class="tab_td">{{ item.phoneNo }}</div>
													</div>

												</template>
											</el-autocomplete>
											<span class="iconfont icon-list"
												@click="utype='add';openuseralert()"></span>
										</div>
									</div>
									<div class="subli_left">
										<label class="subl">项目组成员</label>
										<div class="input-cont">
											<!-- <el-tag v-for="tag in cname" :key="tag.id" closable
												style="margin-right: 5px;margin-bottom: 5px;" @close="jianuser2(tag)">
												{{tag.realName}}
											</el-tag>
											<i class="el-icon-circle-plus"
												style="color: #3574DA;font-size: 24px;position: relative;top: 4px;"
												@click="utype='addcs';check=1;openuseralert2()"></i> -->
											<input type="text" class="form-control" v-model="cnames" readonly
												placeholder="请选择项目组成员" :title="cnames">
											<span class="iconfont icon-list"
												@click="utype='xmz';openuseralert2()"></span>
										</div>
									</div>
								</div>


							</div>
						</div>
						<div class="modal-footer tcent">
							<button class="btn btn-primary" @click="showData">确定</button>
							<button class="btn btn-info close_eng" @click="showadd=false">关闭</button>
						</div>
					</div>
				</div>
			</div>
		</div>

		<!--报修人-->
		<div :class="user_alert?'modal in fade':'modal fade'" role="dialog"
			:style="user_alert?' align-items: center;justify-content: center;display: flex;z-index:202;':'z-index:202'"
			id="engineer">

			<div class="cent w700" style="height: 865px;max-width: 955px;max-height:calc(100vh - 50px)">

				<div class="modal-dialog" role="document">
					<div class="modal-content" style="overflow: visible;">
						<div class="modal-header tit">
							<em></em>选择用户
							<div class="right" @click="closeusertalert">
								<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
										class="iconfont icon-cha" aria-hidden="true"></span> </button>
							</div>
						</div>
						<!--表单-->
						<div class="modal-body h100"
							style="overflow-x: hidden;overflow-y:scroll;height:760px;max-height:calc(100vh - 150px)">

							<div class="left">
								<div class="zTreeDemoBackground">
									<ul id="treeDemo4" class="ztree" @select="choseroom_user"></ul>
								</div>
							</div>
							<div class="right" style="overflow: visible;">
								<div class="search">
									<!-- <form> -->
									<div class="form-group" style="display: flex;padding-right: 0;">
										<input class="form-control" autocomplete="off"
											@keydown.enter="page2=1;word_users=word_user;getalluserlist()"
											v-model="word_user" placeholder="输入关键字">
										<div style="margin-left: 10px;" class="btn btn-success"
											@click="page2=1;word_users=word_user;getalluserlist()">
											<span class="iconfont icon-chaxun"
												style="line-height: 34px;vertical-align: baseline;"></span>
										</div>
									</div>
									<!-- </form> -->
								</div>

								<div class="enr_alert_scorll">
									<div style="height: 552px;overflow-y: auto;">
										<h2 class="tcent" v-if="user_all.length ==0">暂时没有数据</h2>
										<table class="table table-hover smallTab" v-else>
											<tr>
												<th></th>
												<th>账号</th>
												<th>姓名</th>
												<th>电话</th>
											</tr>
											<tr v-for="item,index in user_all">
												<td>
													<input type="radio" v-model="principalId" :value="item.id"
														@change="changechose(item.id,item.realName,item.phoneNo)"
														name="chose2" :id="'c'+item.id"><label
														:for="'c'+item.id"></label>
												</td>
												<td>{{item.userName}}</td>
												<td>{{item.realName}}</td>
												<td>{{item.phoneNo}}</td>
											</tr>
										</table>
									</div>
									<div class="Spage" style="margin: 20px 0;">
										<el-pagination @current-change="handleCurrentChange2" :current-page="page2"
											style="display: flex;justify-content: center;" :pager-count="5"
											:page-size="10" :page-count="num2" layout="prev, pager, next">
										</el-pagination>
									</div>


									<div class="tcent" style="margin-bottom: 30px;">
										<button class="btn btn-primary" @click="sure_user">确定</button>&emsp;
										<button class="btn btn-default" @click="closeusertalert">关闭</button>
									</div>
								</div>


							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<!--选择添加工程师-->
		<div :class="alert_show?'modal in fade':'modal fade'" role="dialog"
			:style="alert_show?' align-items: center;justify-content: center;display: flex;z-index:202':''"
			id="engineer">

			<div class="cent w700" style="height: 865px;max-width: 955px;max-height:calc(100vh - 50px)">

				<div class="modal-dialog" role="document">
					<div class="modal-content" style="overflow: visible;">

						<div class="modal-header tit">
							<em></em>选择用户
							<div class="right" @click="closealert">
								<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
										class="iconfont icon-cha" aria-hidden="true"></span> </button>
							</div>
						</div>
						<!--表单-->
						<div class="modal-body h100"
							style="overflow-x: hidden;overflow-y:scroll;height:760px;max-height:calc(100vh - 150px)">
							<div class="left">
								<div class="zTreeDemoBackground">
									<ul id="treeDemo2" class="ztree" @select="choseroom_user"></ul>
								</div>
							</div>
							<div class="right" style="overflow: visible;">
								<div class="search">
									<!-- <form> -->
									<div class="form-group" style="display: flex;padding-right: 0;">
										<input class="form-control" autocomplete="off"
											@keydown.enter="page2=1;word_users=word_user;getalluserlist()"
											v-model="word_user" placeholder="输入关键字">
										<div style="margin-left: 10px;" class="btn btn-success"
											@click="page2=1;word_users=word_user;getalluserlist()">
											<span class="iconfont icon-chaxun"
												style="line-height: 34px;vertical-align: baseline;"></span>
										</div>
									</div>
									<!-- </form> -->
								</div>
								<div class="txt-black">为您找到{{inglen2}}位 <span class="txt-blue">用户</span> </div>

								<div class="enr_alert_scorll">
									<div style="height: 552px;overflow-y: auto;">
										<h2 class="tcent" v-if="cuserlist.length ==0">暂时没有数据</h2>
										<table class="table table-hover smallTab" v-else>
											<tr>
												<th><input type="checkbox" @change="changeall2" v-model="choseall2"
														name="all2" id="cuser"><label for="cuser"></label></th>
												<th>账号</th>
												<th>姓名</th>
												<th>电话</th>
											</tr>
											<tr v-for="item,index in cuserlist">
												<td>
													<input type="checkbox" v-model="item.chosesf"
														@change="chosechange2(item)" name="chose2"
														:id="'cuser'+item.id"><label :for="'cuser'+item.id"></label>
												</td>
												<td>{{item.userName }}</td>
												<td>{{item.realName}}</td>
												<td>{{item.phoneNo}}</td>
											</tr>
										</table>
									</div>
									<div class="Spage" style="margin: 20px 0;">
										<el-pagination @current-change="handleCurrentChange2" :current-page="page2"
											style="display: flex;justify-content: center;" :pager-count="5"
											:page-size="10" layout="prev, pager, next" :total="inglen2">
										</el-pagination>
									</div>

									<div class="tcent" style="margin-bottom: 30px;">
										<button class="btn btn-primary" @click="cusers">确定</button>&emsp;
										<button class="btn btn-default" @click="closealert()">关闭</button>
									</div>
								</div>


							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<xminfo :id="id" :showinfo="showinfo" @show="show(e)"></xminfo>
		<div class="alzzc" v-if="delalert">
			<div class="del_alert">
				<div class="modal-header tit" style="text-align: left;">
					<em></em>信息
					<div class="right" @click="delalert=false">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"
							style="line-height: normal;"><span class="iconfont icon-cha" aria-hidden="true"></span>
						</button>
					</div>
				</div>
				<div class="alert_info">确认要删除选中的<span>{{delnum}}</span>条数据吗？</div>
				<div class="alert_btns">
					<div class="alert_sure" @click="delxm">确认</div>
					<div class="alert_close" @click="delalert=false">取消</div>
				</div>
			</div>
		</div>
		<div class="loading-content" v-if="showloading">
			<div class="loading-spinner">
				<svg viewBox="25 25 50 50" class="circular">
					<circle cx="50" cy="50" r="20" fill="none" class="path"></circle>
				</svg>
			</div>
			<div class="loading-text">加载中...</div>
		</div>
	</div>
</template>

<script type="text/babel">
	// import $, { param } from 'jquery'
// import rwinfo from './taskinfo.vue'
import xminfo from './projectinfo.vue'
	export default {
		name: "",
		props: {
			typelist:{
				type:String,
				default:''
			},
			rwinfoid:{
				type:String,
				default:''
			},
		},
		data() {
			return {
				rwid:"",
				id:"",
				showrwinfo: false,
				choseall: false,
				delalert: false,
				isclick1: false,
				showhtinfo: false,
				showinfo: false,
				showinv: false,
				showpay: false,
				limit_p: 10,
				limit_i: 10,
				inglen_p: 0,
				inglen_i: 0,
				page_i: 1,
				page_p: 1,
				msgremark: '',
				remark: '',
				
				fileList_i:[],
				files3id_i:[],
				files_i:[],
				invinfo:{},
				payinfo:{},
				payid:"",
				invid:"",
				uname_fp:"",
				uname_fk:"",
				activeNames:"first",
				options_i:[],
				invlist:[],
				paylist:[],
				editableTabsValue:1,
				buy:[
						{
						"id" : '',
						"xmAgreementId" : '',
						"type" : 1,
						"number" : 1,
						"promise" : "",
						"money" : "",
						"time"  : "",
						},
				],
				maintain:[
						{
						"id" : '',
						"xmAgreementId" : '',
						"type" : 2,
						"number" : 1,
						"promise" : "",
						"money" : "",
						"time"  : "",
						},
				],
				user_c2:[],
				cname2:[],
				rwi:"",
				cnames2:"",
				value5:"",
				hylist: [],
				htlist: [],
				dylist: [],
				options5: [],
				options_partb: [],
				options_ht: [],
				options_hy: [],
				options_xq: [],
				rwlist: [],
				options2: [],
				date_value1:"",
				value1: null,
				susername:"",
				value_xq:"",
				value2:"",
				menushow:false,
				spshow:false,
				showrw:false,
				showjd:false,
				showht:false,
				showhy:false,
				choseall2:false,
				value3:1,
				activeName:1,
				uname_jl:"",
				uname_zz :"",
				uname_xq:"",
				word2:"",
				word_user:"",
				word_users:"",
				naes:"",
				userid:"",
				byDate:"",
				byDate2:"",
				byDates:"",
				byDate2s:"",
				principalId:"",
				principalIds:"",
				type:"",
				xqlist:[],
				showxq:false,
				user_alert:false,
				options_show2:false,
				
				showadd: false,
				showzzc: false,
				cuserlist: [],
				options6: [],
				zNodes_u: [],
				ztree_obj_u: {},
				treeClickCount4: 0,
				setting_u: {
					treeId: 'id',
					data: {
						key: {
							name: 'name'
						}
					},
					callback: {
						onClick: this.choseroom_user
					}
				},
				tabIndex: 2,
				page2: 1,
				page: 1,
				pagex: 1,
				pager: 1,
				list: [],
				inglen: 0,
				inglen2: 0,
				inglenx: 0,
				limit: 10,
				limit2: 10,
				limitr: 10,
				limitx: 10,
				num: 1,
				num2: 1,
				uname:"",
				info: {},
				rwinfo: {},
				jdinfo: {compare:'',num:2},
				htinfo: {},
				hyinfo: {},
				xqinfo: {xqDescription:'',emergencyId:1},
				xmDescription:"",
				showloading: false,
				alert_show: false,
				user_all:[],
				user_c:[],
				user_cy:[],
				user_sp:[],
				cname:[],
				options7: [],
				cname_cy:[],
				cname_sp:[],
				fileList2:[],
				fileList3:[],
				files3id:[],
				files2id:[],
				files2:[],
				files3:[],
				cnames:"",
				cnames_cy:"",
				cnames_sp:"",
				createName:"",
				completeName:"",
				xmStageName:"",
				uid: sessionStorage.getItem('uid'),
				realName: sessionStorage.getItem('realName')
			}
		},
		components: {xminfo},
		
		mounted() {
			this.getmb();
			this.getlist();
			this.gettype();
		},
	
		beforeRouteEnter(to, from, next) { //路由导航钩子，通过页面路由标记是否需要清空页面数据重新加载
		    to.meta['fromPath'] = from.path;
			to.meta['needFresh'] = false;
		    
		    next();
		  },
		activated(){
			
		},
		methods: {
			show(e){
				console.log(e)
				this.showinfo = e
				this.getlist()
			},
			
			
			changeall(){
				if(this.choseall){
					for (var i = 0; i < this.list.length; i++) {
						this.list[i].chosesf = true
					}
				}else{
					for (var i = 0; i < this.list.length; i++) {
						this.list[i].chosesf = false
					}
				}
			},
			chosechange(){
				for (var i = 0; i < this.list.length; i++) {
					if(this.list[i].chosesf == true){
						this.choseall=true
					}else{
						this.choseall=false
						break
					}
					
				}
			},
			
	
			openselect(e){
				// this.showzzc = true
				// console.log(e)
				// if(!e){
					this.openadd(this.value5)
				// }
			},
			// 模板
			getmb() {
				var that = this
				this.$http.get(this.$url + '/xm/template/select')
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.options5 = response.data.data
						for (var i = 0; i < that.options5.length; i++) {
							if(that.options5[i].isDefault == 1){
								that.value5 = that.options5[i].id
								that.mbid = that.options5[i].id
							}
						}
						
					})
					.catch(function(error) {
					});
			},
			delopen(id){
				var ids=''
				var num = 0
					for (var i = 0; i < this.list.length; i++) {
						if(this.list[i].chosesf==true){
							ids = ids+''+this.list[i].id+','
							num++
						}
					}
					this.ids = ids.substring(0,ids.length-1)
					if(this.ids==''){
						this.$Toast('暂无选中');
						return
					}
				this.delnum = num
				this.delalert=true		
			},
			// 删除
			delxm(){
				this.delalert=false
				var that = this
				this.$confirm('是否删除项目及项目下的所有内容？')
				          .then(_ => {
					var param = {
						ids:that.ids
					}
					that.$http.post(that.$url + '/xm/delete', that.$qs.stringify(param))
						.then(function(response) {
							if (response.data.code == '1410') {
								that.$Toast(response.data.msg);
								sessionStorage.setItem('token', '')
								that.$router.push('/login')
								return
							}
							that.$Toast(response.data.msg);
							that.page=1
							that.choseall = false
							that.getlist()
						})
						.catch(function(error) {
							console.log(error);
							that.$Toast('网络拥堵，刷新一下');
						});
					})
					.catch(_ => {});
			},
			changeact(i){
				this.showloading = true
				var param = {
					xmId:this.list[i].id,
					userId: sessionStorage.getItem('uid')
				}
				var part = ''
				if(this.list[i].isAttention == 0){
					part = '/xm/addAttention'
				}else{
					part = '/xm/deleteAttention'
				}
				var that = this
				this.$http.post(this.$url + part, this.$qs.stringify(param))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.$Toast(response.data.msg)
						that.getlist()
						that.showloading = false
					})
					.catch(function(error) {
						console.log(error);
						that.$Toast('网络拥堵，刷新一下');
					});
			},
			closealert(){
				if(this.utype=='cy'){
					this.cnames_cy = this.cname_cy.join(',')
				}else if(this.utype == 'addsp'){
					this.cnames_sp = this.cname_sp.join(',')
				}else if(this.utype == 'addcs'){
					this.cnames2 = this.cname2.join(',')
				}else{
					this.cnames = this.cname.join(',')
					// var a = []
					// for (var i = 0; i < this.cname.length; i++) {
					// 	console.log(this.cname[i])
					// 	a.push(this.cname[i].realname)
					// }
					// console.log(a)
					// this.cnames = a.join(',')
				}
				this.choseall2=false
				this.alert_show=false;
				this.word_user = ''
				this.word_users = ''
				this.deptId = ''
				this.did = ''
				
				this.ztree_obj_u.cancelSelectedNode();
				this.getalluserlist()
			},
			openuseralert(){
				
				this.page2 = 1
				this.username = ''
				this.principalId = ''
				this.word_user = ''
				this.did = ''
				this.userid = ''
				this.uphone = ''
				
				this.getrooms()
				this.getalluserlist()
				this.user_alert = true
			},
			openuseralert2(){
				this.getrooms()
				this.page2 = 1
				this.getalluserlist()
				this.alert_show = true
			},
			handleCurrentChange2(val) {
			  console.log(`当前页: ${val}`);
								this.page2 = val
								this.choseall2 = false
								this.getalluserlist()
			},
			changechose(id,name,phone){
				if(this.utype == 'xq'){
					this.uname_xq = name
					this.xqinfo.adviceman = id
				}else if(this.utype == 'zz'){
					this.uname_zz = name
					this.hyinfo.organizeId = id
				}else if(this.utype == 'jl'){
					this.uname_jl = name
					this.hyinfo.recordId = id
				}else if(this.utype == 'addzx'){
					this.completeName = name
					this.rwinfo.completeId = id
				}else if(this.utype == 'fk'){
					this.uname_fk = name
					this.payinfo.operateId = id
				}else if(this.utype == 'fp'){
					this.uname_fp = name
					this.invinfo.operateId = id
				}else if(this.utype == 'search'){
					this.susername = name
					this.principalId = id
				}else{
					this.uname = name
					this.info.principalId = id
					this.isclick1 = true
				}
			},
			chosechange2(e){
				// console.log(this.cname)
				console.log(e.chosesf)
				if(e.chosesf){
					if(this.utype == 'cy'){
						this.user_cy.push(e.id)
						this.cname_cy.push(e.realName)
						this.user_cy = this.user_cy.filter((item, index, array) => {
						  return array.indexOf(item) === index
						})
						// this.cname_cy = this.cname_cy.filter((item, index, array) => {
						//   return array.indexOf(item) === index
						// })
					}else if(this.utype == 'addcs'){
						this.user_c2.push(e.id)
						this.cname2.push(e.realName)
						this.user_c2 = this.user_c2.filter((item, index, array) => {
						  return array.indexOf(item) === index
						})
						// this.cname2 = this.cname2.filter((item, index, array) => {
						//   return array.indexOf(item) === index
						// })
					}else if(this.utype == 'addsp'){
						this.user_sp.push(e.id)
						this.cname_sp.push(e.realName)
						this.user_sp = this.user_sp.filter((item, index, array) => {
						  return array.indexOf(item) === index
						})
						// this.cname_sp = this.cname_sp.filter((item, index, array) => {
						//   return array.indexOf(item) === index
						// })
					}else if(this.utype == 'xmz'){
						this.user_c.push(e.id)
						this.cname.push(e.realName)
						
						this.user_c = this.user_c.filter((item, index, array) => {
						  return array.indexOf(item) === index
						})
						// this.cname = this.cname.filter((item, index, array) => {
						//   return array.indexOf(item) === index
						// })
					}
				}else{
					if(this.utype == 'cy'){
						this.cname_cy.splice(this.cname_cy.indexOf(e.realName),1)
						this.user_cy.splice(this.user_cy.indexOf(e.id),1)
						// if(this.cname_cy.indexOf(e.realName) > -1){
						// 	this.cname_cy.splice(this.cname_cy.indexOf(e.realName),1)
						// }
						// if(this.user_cy.indexOf(e.id) > -1){
						// 	this.user_cy.splice(this.user_cy.indexOf(e.id),1)
						// }
					}else if(this.utype == 'addcs'){
						this.cname2.splice(this.cname2.indexOf(e.realName),1)
						this.user_c2.splice(this.user_c2.indexOf(e.id),1)
						
					}else if(this.utype == 'addsp'){
						this.cname_sp.splice(this.cname_sp.indexOf(e.realName),1)
						this.user_sp.splice(this.user_sp.indexOf(e.id),1)
						// if(this.cname_sp.indexOf(e.realName) > -1){
						// 	this.cname_sp.splice(this.cname_sp.indexOf(e.realName),1)
						// }
						// if(this.user_sp.indexOf(e.id) > -1){
						// 	this.user_sp.splice(this.user_sp.indexOf(e.id),1)
						// }
					}else if(this.utype == 'xmz'){
						
						// if(this.user_c.indexOf(e.id) > -1){
							console.log('xmfx==='+this.user_c.indexOf(e.id))
							this.user_c.splice(this.user_c.indexOf(e.id),1)
							this.cname.splice(this.cname.indexOf(e.realName),1)
						// }
					}
				}
				console.log(this.cname)
				// return
				var a = 0
				for (var i = 0; i < this.cuserlist.length; i++) {
					// console.log(this.cuserlist[i])
					if(this.cuserlist[i].chosesf == true){
						a++
					}
					
				}
				if(a == this.cuserlist.length){
					this.choseall2=true
				}else{
					this.choseall2=false
				}
				this.$forceUpdate()
			},
			changeall2(){
				if(this.choseall2){
					for (var i = 0; i < this.cuserlist.length; i++) {
						this.cuserlist[i].chosesf = true
						if(this.utype == 'cy'){
							this.user_cy.push(this.cuserlist[i].id)
							this.cname_cy.push(this.cuserlist[i].realName)
							console.log(this.cname_cy)
							this.user_cy = this.user_cy.filter((item, index, array) => {
							  return array.indexOf(item) === index
							})
							this.cname_cy = this.cname_cy.filter((item, index, array) => {
							  return array.indexOf(item) === index
							})
						}else if(this.utype == 'addsp'){
							this.user_sp.push(this.cuserlist[i].id)
							this.cname_sp.push(this.cuserlist[i].realName)
							console.log(this.cname_sp)
							this.user_sp = this.user_sp.filter((item, index, array) => {
							  return array.indexOf(item) === index
							})
							this.cname_sp = this.cname_sp.filter((item, index, array) => {
							  return array.indexOf(item) === index
							})
						}else if(this.utype == 'addcs'){
							this.user_c2.push(this.cuserlist[i].id)
							this.cname2.push(this.cuserlist[i].realName)
							this.user_c2 = this.user_c2.filter((item, index, array) => {
							  return array.indexOf(item) === index
							})
							this.cname2 = this.cname2.filter((item, index, array) => {
							  return array.indexOf(item) === index
							})
						}else if(this.utype == 'xmz'){
							this.user_c.push(this.cuserlist[i].id)
							this.cname.push(this.cuserlist[i].realName)
							this.user_c = this.user_c.filter((item, index, array) => {
							  return array.indexOf(item) === index
							})
							this.cname = this.cname.filter((item, index, array) => {
							  return array.indexOf(item) === index
							})
						}
						
					}
				}else{
					for (var i = 0; i < this.cuserlist.length; i++) {
						if(this.utype == 'addsp'){
							this.user_c.splice(this.user_c.indexOf(this.cuserlist[i].id),1)
							this.cname.splice(this.cname.indexOf(this.cuserlist[i].realName),1)
						}else if(this.utype == 'addcs'){
								this.user_c2.splice(this.user_c2.indexOf(this.cuserlist[i].id),1)
								this.cname2.splice(this.cname2.indexOf(this.cuserlist[i].realName),1)
						}else if(this.utype == 'cy'){
								this.user_cy.splice(this.user_cy.indexOf(this.cuserlist[i].id),1)
								this.cname_cy.splice(this.cname_cy.indexOf(this.cuserlist[i].realName),1)
						}else{
							this.user_c.splice(this.user_c.indexOf(this.cuserlist[i].id),1)
							this.cname.splice(this.cname.indexOf(this.cuserlist[i].realName),1)
						}
						this.cuserlist[i].chosesf = false
					}
					this.$forceUpdate()
				}
			},
			sure_user(){
				if(this.utype == 'search'){
					// this.principalId = ''
				}
				this.user_alert = false
				// this.username = ''
				// this.principalId = ''
				this.word_user = ''
				this.did = ''
				// this.userid = ''
				// this.uphone = ''
				this.ztree_obj_u.cancelSelectedNode();
				this.getrooms()
				this.getalluserlist()
				
			},
			cusers(){
				
				
				if(this.utype=='cy'){
					this.cnames_cy = this.cname_cy.join(',')
				}else if(this.utype == 'addsp'){
					this.cnames_sp = this.cname_sp.join(',')
				}else if(this.utype == 'addcs'){
					this.cnames2 = this.cname2.join(',')
				}else{
					this.cnames = this.cname.join(',')
					// var a = []
					// for (var i = 0; i < this.cname.length; i++) {
					// 	console.log(this.cname[i])
					// 	a.push(this.cname[i].realname)
					// }
					// console.log(a)
					// this.cnames = a.join(',')
				}
				this.alert_show=false
				this.word_user = ''
				this.word_users = ''
				this.deptId = ''
				
				this.did = ''
				this.ztree_obj_u.cancelSelectedNode();
				this.getalluserlist()
			},
			closeusertalert(){
				this.user_alert = false
				this.username = ''
				this.principalId = ''
				this.word_user = ''
				this.did = ''
				this.userid = ''
				this.uphone = ''
				this.ztree_obj_u.cancelSelectedNode();
				this.getrooms()
				this.getalluserlist()
			},
			// 获取查询项目状态
			gettype() {
				var that = this
				this.$http.get(this.$url + '/xm/stateList')
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.options6 = response.data.data
						that.options2 = response.data.data
						that.options2.unshift({'name':'全部状态',id:''})
						if(that.options6[0].name == '全部状态'){
							that.options6 = that.options6.slice(1)
						}
					})
					.catch(function(error) {
					});
			},
			changedate(ty){
				if(this.info.beginDate && this.info.finishDate&& this.info.beginDate > this.info.finishDate){
					this.$Toast('选择的结束日期在开始日期之前');
					if(ty==1){
						this.info.beginDate = ''
					}else{
						this.info.finishDate = ''
					}
					return
				}
				
				
				if(this.byDate && this.byDate2 && this.byDate > this.byDate2){
					this.$Toast('选择的结束日期在开始日期之前');
					if(ty==1){
						this.byDate = ''
					}else{
						this.byDate2 = ''
					}
					return
				}
				
			},
			// 获取弹窗里的用户
			getalluserlist() {
				this.choseall2 = false
				// console.log(this.page2)
				var id = this.did?this.did:''
				var that = this
				var url = encodeURI(this.$url + '/sys/user/list?page='+this.page2+'&limit='+this.limit2+'&deptId='+id+'&userName='+this.word_users)
				this.$http.get(url)
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.user_all = response.data.data.records
						that.cuserlist = response.data.data.records
						for (var i = 0; i < that.user_all.length; i++) {
							that.user_all[i].id = window.atob(that.user_all[i].id)
							that.cuserlist[i].id = that.user_all[i].id
						}
						var a = 0
						// console.log(that.user_c)
						
						
						for (var i = 0; i < that.cuserlist.length; i++) {
							if(that.utype=='cy'){
								if(that.user_cy.indexOf(that.cuserlist[i].id) > -1){
									a++
									that.cuserlist[i].chosesf = true
								}else{
									that.cuserlist[i].chosesf = false
								}
							}else if(that.utype=='addsp'){
								if(that.user_sp.indexOf(that.cuserlist[i].id) > -1){
									a++
									that.cuserlist[i].chosesf = true
								}else{
									that.cuserlist[i].chosesf = false
								}
							}else if(that.utype=='addcs'){
								if(that.user_c2.indexOf(that.cuserlist[i].id) > -1){
									a++
									that.cuserlist[i].chosesf = true
								}else{
									that.cuserlist[i].chosesf = false
								}
							}else{
								if(that.user_c.indexOf(that.cuserlist[i].id) > -1){
									a++
									that.cuserlist[i].chosesf = true
								}else{
									that.cuserlist[i].chosesf = false
								}
							}
							
						}
						if(a == that.cuserlist.length){
							that.choseall2=true
						}else{
							that.choseall2=false
						}
						that.inglen2 = response.data.data.total
						if (that.inglen2 > that.limit2) {
							that.num2 = response.data.data.pages
						} else {
							that.num2 = 1
						}
						// console.log(that.cname)
					})
					.catch(function(error) {
						console.log(error);
						// sessionStorage.setItem('token','undefined')
						// that.$router.push('/login')
					});
			},
			// 科室树状图选择
			choseroom_user(data, node, treeNode) {
				this.treeClickCount4++;
				if (this.treeClickCount4 >= 2) {
					return;
				}
				this.timer = window.setTimeout(() => {
					if (this.treeClickCount4 == 1) {
						this.treeClickCount4 = 0;
						console.log('单击事件,可在此处理对应逻辑')
							
								this.did = treeNode.id
							this.page2=1
							this.getalluserlist()
						
					} else if (this.treeClickCount4 > 1) {
						this.treeClickCount4 = 0;
						
						this.ztree_obj_u.cancelSelectedNode();
						console.log('双击事件,可在此处理对应逻辑')
					}
				}, 300);
			},
			// 获取科室
			getrooms() {
				var param = {
					parentId: 0
				}
				var that = this
				this.$http.post(this.$url + '/sys/dept/tree', this.$qs.stringify(param))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						
						that.zNodes = response.data.data
						that.ztree_obj = $.fn.zTree.init($("#treeDemo"), that.setting, that.zNodes);
						var  nodes = that.ztree_obj.getNodes();
						for  ( var  i = 0; i < nodes.length; i++) {  //设置节点展开
						    that.ztree_obj.expandNode(nodes[i],  true ,  false ,  true );
						}
						that.zNodes_u = response.data.data
						that.ztree_obj_u = $.fn.zTree.init($("#treeDemo4"), that.setting_u, that.zNodes_u);
						that.ztree_obj_u = $.fn.zTree.init($("#treeDemo2"), that.setting_u, that.zNodes_u);
						 var  nodes = that.ztree_obj_u.getNodes();
						for  ( var  i = 0; i < nodes.length; i++) {  //设置节点展开
						    that.ztree_obj_u.expandNode(nodes[i],  true ,  false ,  true );
						}
					})
					.catch(function(error) {
						console.log(error);
						
						that.$Toast('网络拥堵，刷新一下');
					});
			
			},
			querySearch_u(queryString, cb) {
				var that = this
				var name =  this.completeName?this.completeName:''
				var id = this.info.departId?this.info.departId:''
				var url = encodeURI(this.$url + '/sys/user/select?realName='+name)
				this.$http.get(url)
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.restaurants_u = response.data.data
						that.restaurants_u.unshift({userName:"账号",realName:"姓名",departName:"科室",phoneNo:"电话"})
						var restaurants_u = that.restaurants_u;
						var results = queryString ? restaurants_u.filter(that.createFilter_u(queryString)) : restaurants_u;
						// 调用 callback 返回建议列表的数据
						if(results.length == 0){
							results.unshift({userName:"暂无内容",realName:"",departName:"",phoneNo:""})
						}else{
							if(results[0].id){
								results.unshift({userName:"账号",realName:"姓名",departName:"科室",phoneNo:"电话"})
							}
						}
						
						cb(results);
						// console.log(that.restaurants)
					})
					.catch(function(error) {
						console.log(error);						
						that.$Toast('网络拥堵，刷新一下');
					});
					
			  
			},
			querySearch_xm(queryString, cb) {
				var that = this
				var name =  this.uname?this.uname:''
				
				var id = this.info.departId?this.info.departId:''
				var url = encodeURI(this.$url + '/sys/user/select?realName='+name)
				this.$http.get(url)
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.restaurants_u = response.data.data
						that.restaurants_u.unshift({userName:"账号",realName:"姓名",departName:"科室",phoneNo:"电话"})
						var restaurants_u = that.restaurants_u;
						var results = queryString ? restaurants_u.filter(that.createFilter_u(queryString)) : restaurants_u;
						// 调用 callback 返回建议列表的数据
						if(results.length == 0){
							results.unshift({userName:"暂无内容",realName:"",departName:"",phoneNo:""})
						}else{
							if(results[0].id){
								results.unshift({userName:"账号",realName:"姓名",departName:"科室",phoneNo:"电话"})
							}
						}
						
						cb(results);
						// console.log(that.restaurants)
					})
					.catch(function(error) {
						console.log(error);						
						that.$Toast('网络拥堵，刷新一下');
					});
					
			  
			},
			
			
			createFilter_u(queryString) {
				return (restaurant) => {
					// if(restaurant.realName){
						return (restaurant.realName.toLowerCase().indexOf(queryString.toLowerCase()) != -1);
					// }
				};
			},
			handleSelect_u(item) {
				if(!item.id){
					this.info.commitUserName=''
					return 
				}
				this.info.commitUserName = item.realName
				this.info.principalId = item.id
				this.isclick1 = true
				// this.did = item.id				
			},
			openadd(id){
				this.type = 'add'
				
				if(id > 0){
					this.showloading = true
					var that = this
					var param={id:id}
					this.$http.post(this.$url + '/xm/template/selectOne', this.$qs.stringify(param))
						.then(function(response) {
							if (response.data.code == '1410') {
								that.$Toast(response.data.msg);
								sessionStorage.setItem('token', '')
								that.$router.push('/login')
								return
							}
							that.info = {
								// createId:response.data.data.createId,
								// xmName:response.data.data.xmName,
								// xmDescription:response.data.data.xmDescription,
								// id:response.data.data.id,
								// principalId:response.data.data.principalId,
								 xmTemplateId:response.data.data.id,
							}
							that.showadd=true
							that.showloading = false
						})
						.catch(function(error) {
							console.log(error);
							that.$Toast('网络拥堵，刷新一下');
						});
				}else{
					this.showadd=true
				}
					
			},
		
			edit(index){
				this.type = 'edit'
				var param = {
					id:this.list[index].id
				}
				this.showloading = true
				var that = this
				this.$http.post(this.$url + '/xm/getOneXm', this.$qs.stringify(param))
					.then(function(response) {
						that.info = {
							stateId:response.data.data.stateId,
							beginDate: new Date(response.data.data.beginDate),
							finishDate: new Date(response.data.data.finishDate),
							createId:response.data.data.createId,
							xmName:response.data.data.xmName,
							xmDescription:response.data.data.xmDescription,
							id:response.data.data.id,
							principalId:response.data.data.principalId,
						}
						if(that.info.principalId){
							that.isclick1 = true
						}
						
						that.value3 = that.info.stateId
						that.xmDescription = that.info.xmDescription
						that.uname = response.data.data.principalName
						that.user_c = response.data.data.memberIds?response.data.data.memberIds.split(','):[]
						for (var i = 0; i < that.user_c.length; i++) {
							that.user_c[i] = parseInt(that.user_c[i])
						}
						that.cnames = []
						that.cname = []
						for (var i = 0; i < response.data.data.members.length; i++) {
							that.cnames.push(response.data.data.members[i].realName)
							that.cname.push(response.data.data.members[i].realName)
							// that.cname.push({realname:response.data.data.members[i].realName,id:response.data.data.members[i].id})
						}
						console.log(that.cname)
						that.cnames = that.cnames.join(',')
						
						that.showloading = false
					})
					.catch(function(error) {
						console.log(error);
						that.$Toast('网络拥堵，刷新一下');
					});
				
				this.showadd = true
			},
			closeadd(){
				this.showadd = false;
				this.showinfo = false;
				this.value3 = ''
				this.xmDescription = ''
				this.uname = ''
				this.user_c = []
				this.cname = []
				this.cnames = ''
				// this.activeName = 1
				// this.pagex=1
				this.info =  {
					id:""
				}
				console.log(this.cname)
			},
		
			
			 handleSizeChange(val) {
			        console.log(`每页 ${val} 条`);
					this.limit = val
					this.choseall = false
					this.getlist()
			},
			handleCurrentChange(val) {
			        console.log(`当前页: ${val}`);
					this.page = val
					this.choseall = false
					this.getlist()
			},
			
			// 表单提交
			showData() {
				console.log(this.info)
				if(!this.isclick1){
					this.$Toast("请点击选择项目经理");
					return false;
				}
				if(this.info.beginDate == '1970-01-01' || !this.info.beginDate || this.info.finishDate == '1970-01-01'|| !this.info.finishDate || !this.info.xmName || !this.info.principalId){
					this.$Toast('请填写必填项');
					return
				}
				
				this.info.memberIds = this.user_c.join(',')
				this.info.createId = sessionStorage.getItem('uid')
				this.info.beginDate = this.timeFormate(this.info.beginDate)
				this.info.finishDate = this.timeFormate(this.info.finishDate)
				this.info.stateId = this.value3
				this.info.xmDescription = this.xmDescription
				
				this.showloading = true
				var that = this
				this.$http.post(this.$url + '/xm/save', this.$qs.stringify(this.info))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.$Toast(response.data.msg);
						that.isclick1 = false
						that.showadd = false
						that.showloading = false
						that.info =  {}
						that.value3 = ''
						that.xmDescription = ''
						that.uname =''
						that.user_c = []
						that.cname = []
						that.cnames = ""
						that.getlist()
					})
					.catch(function(error) {
						that.$Toast('网络拥堵，刷新一下');
					});
				
			},
			
			// 点击遮罩层
			close(){
				this.options_show=false
				this.options_show2=false
				this.showzzc=false
				this.showrwinfo=false
			},
	
			//显示当前时间（年月日）
			timeFormate(timeStamp) {
			      let year = new Date(timeStamp).getFullYear();
			      let month =new Date(timeStamp).getMonth() + 1 < 10? "0" + (new Date(timeStamp).getMonth() + 1): new Date(timeStamp).getMonth() + 1;
			      let date =new Date(timeStamp).getDate() < 10? "0" + new Date(timeStamp).getDate(): new Date(timeStamp).getDate();
			     return year + "-" + month + "-" + date  ;
			    },
			getlist() {
				this.showloading = true
				var param ={
						page: this.page,
						limit: this.limit,
						principalId:this.principalIds,
						beginDate:this.byDates?this.timeFormate(this.byDates):'',
						finishDate:this.byDate2s?this.timeFormate(this.byDate2s):"",
						faultTypeId:this.faultTypeIds,
						xmName:this.naes,
						stateId: this.value2s,
						
					}
					// console.log(this.typelist)
					if(this.typelist == 'attentionId'){
						param.attentionId = sessionStorage.getItem('uid')
					}else if(this.typelist == 'partake'){
						param.partake = sessionStorage.getItem('uid')
					}else if(this.typelist == 'myRes'){
						param.myRes = sessionStorage.getItem('uid')
					}
					
					
				var that = this
				this.$http.post(this.$url + '/xm/select', this.$qs.stringify(param))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.list = response.data.data
						that.inglen = response.data.count
						for (var i = 0; i < that.list.length; i++) {
							that.list[i].chosesf = false
						}
						that.choseall = false
						that.showloading = false
					})
					.catch(function(error) {
						console.log(error);
						// sessionStorage.setItem('token','undefined')
						// that.$router.push('/login')
						
						that.$Toast('网络拥堵，刷新一下');
					});

			},
		},

		computed: {},
	}
</script>
<style lang='less' scoped>
	.rwadd {
		height: 20px;
		line-height: 20px;
		padding-right: 8px;
		border-right: 1px solid #fff;
		margin-right: 13px;
	}

	.rw {
		width: 120px;
		margin-bottom: 20px;
		background-color: #409eff;
		border-radius: 34px;
	}

	.btnsele {
		border: none;
		margin-bottom: 0 !important;

		margin-left: 0 !important;
	}

	.rw .btnsele /deep/ .el-input .el-select__caret {
		color: #fff;
		position: relative;
		left: 10px;
	}

	.rw .btnsele /deep/ .el-input__inner {
		width: 10px;
		border: none;
		padding: 0;
		background: transparent;
		color: transparent;
		/* height: 0; */
	}


	.snum {
		position: absolute;
		bottom: 10px;
		right: 15px;
		font-size: 12px;
	}

	.subli .el-date-editor--date /deep/.el-input__suffix,
	.subli .el-date-editor--datetime /deep/.el-input__suffix {
		right: 30px;
	}

	td .el-date-editor--date /deep/.el-input__suffix,
	td .el-date-editor--datetime /deep/.el-input__suffix {
		right: 30px;
	}


	.input-cont div {
		word-break: break-all;
		max-width: 290px;
	}

	.foucs {
		width: 18px;
		height: 18px;
		margin-bottom: 3px;
		margin-left: 15px;
		cursor: pointer;
	}

	.input-cont:hover .clears {
		display: block;
	}

	.clears {
		width: 10px;
		position: absolute;
		right: 35px;
		top: 14px;
		display: none;
		cursor: pointer;
	}

	.sublia {
		display: flex;

	}

	.subli textarea {
		width: 673px;
		height: 224px;
		background: #FFFFFF;
		border: 1px solid #CCCCCC;
		box-shadow: 0px 2px 0px 0px #EEEEEE;
		border-radius: 5px;
		outline: none;
		padding: 10px 10px;
	}

	.subli /deep/ .el-date-editor--date .el-input__inner,
	.subli /deep/ .el-date-editor.el-input,
	.el-date-editor.el-input__inner {
		width: 271px !important;
	}

	.subl {
		width: 100px;
		text-align: right;
		margin-right: 17px;
	}

	.subli .el-date-editor--date /deep/ .el-input__prefix {
		right: 5px;
		left: auto;
		width: 25px;
	}

	.subli .el-date-editor--datetime /deep/ .el-input__prefix {
		right: 5px;
		left: auto;
		width: 25px;
	}

	td /deep/ .el-input__prefix {
		right: 5px;
		left: auto;
		width: 25px;
	}

	/* .el-date-editor--datetime .el-input__suffix {
		right: 25px;
		left: auto;
		width: 25px;
	}
	
	.el-date-editor--datetime .el-input__prefix {
		right: 5px;
		left: auto;
		width: 25px;
	}
	 */

	.subli input,
	.subli .el-select {
		width: 271px;
		margin-left: 0;
	}

	.subli /deep/ .el-input__inner {
		height: 34px;
	}

	.subli label {
		margin-bottom: 0;
	}

	.sublist {
		padding-top: 15px;
	}

	.subli_left {
		display: flex;
		/* align-items: center; */
		width: 50%;
	}

	.subli {
		display: flex;
		/* align-items: center; */
		color: #000;
		margin-bottom: 15px;
		justify-content: space-between;
	}

	/deep/ .el-pagination .btn-prev {
		border: 1px solid #ccc;
		padding: 0;
		border-right: none;
		min-width: 33px;
		height: 33px;
		padding-top: 2px;
	}

	/deep/ .el-pagination .btn-next {
		border: 1px solid #ccc;
		padding: 0;
		border-left: none;
		min-width: 33px;
		height: 33px;
		padding-top: 2px;
	}

	/deep/ .el-pager li {
		border: 1px solid #ccc;
		padding: 0;
		border-right: none;
		min-width: 33px;
		height: 33px;
		line-height: 33px;
	}

	/deep/ .el-pager li:nth-last-of-type(1) {
		border-right: 1px solid #ccc;
	}

	/deep/ .el-pager li.active {
		border: #4286f5 1px solid;
		background: #4286f5;
		color: #fff;
	}

	.numslen {
		position: absolute;
		bottom: 0px;
		right: 50px;
		font-size: 12px;
	}

	/deep/ .el-input--prefix .el-input__inner {
		height: 34px;
		padding: 0 8px;
	}



	td /deep/ .el-date-editor--date .el-input__inner {
		width: 100% !important;
	}

	/deep/ .el-date-editor--date .el-input__inner {
		width: 150px !important;
	}

	.search_box /deep/ .el-input__inner {
		width: 117px;
		height: 34px;
		/* background: #F6F6F6; */
		border: 1px solid #CCCCCC;
		/* box-shadow: 0px 2px 0px 0px #EEEEEE; */
		border-radius: 5px;
	}

	/deep/ .el-input__icon {
		line-height: 34px;
	}


	.el-select {
		margin-left: 10px;
	}

	.search_box .el-select {
		margin-bottom: 20px;
	}

	.form-group .el-select {
		margin-left: 0px
	}

	.el-input__icon {
		line-height: 34px;
	}

	.el-input__inner {
		height: 34px;
		width: 110px;
		/* margin-left: 10px; */
	}

	.el-upload__input {
		bottom: 35px;
	}


	.btns {
		min-width: 72px;
		padding: 0 8px !important;
		width: auto !important;
	}


	.options {
		z-index: 40001;
	}



	.down_li:hover {
		background: #4286f5;
		color: #fff;
	}


	.modal-lg .modal-body.h100 {
		height: calc(100vh - 130px);
	}

	.el-input--prefix .el-input__inner {
		padding-left: 12px;
		padding-right: 12px;
	}

	.search_inp {
		/* width: 260px; */
		width: 160px;
		margin-left: 10px;
		margin-bottom: 20px;
	}

	.mb0,
	.mb0 .form-group {
		margin-bottom: 15px;
	}


	.btn-primary:hover {
		color: #fff !important;
		background: #4286f5 !important;
		border: none;
	}

	.btn-primary {
		outline: none !important;
		color: #fff !important;
		background: #4286f5 !important;
		margin-right: 18px;
	}

	.close_eng:hover {
		color: #434343 !important;
		background: #EEEEEE !important;
		border: none;
	}

	.close_eng {
		border: none;
		color: #434343 !important;
		background: #EEEEEE !important;
		outline: none !important;
	}

	.el-autocomplete {
		width: 271px;
	}

	.el-autocomplete-suggestion li.highlighted,
	.el-autocomplete-suggestion li:hover {
		background-color: #ddd;
	}

	.el-popper {
		margin-top: 0;
	}

	.my-autocomplete {
		border-radius: 0 0 6px 6px;
		min-width: 400px;
		margin-top: 0 !important;


		.popper__arrow {
			display: none;
		}

		.el-scrollbar__wrap {
			padding: 0 !important;
			overflow-x: scroll;

			li {
				padding: 0 !important;
				min-width: 320px;
			}

		}

	}

	.tab_td {
		width: 25%;
		min-width: 80px;
		display: inline-block;
		padding: 0 10px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.el-scrollbar__wrap {
		-ms-overflow-style: none !important;
	}

	.el-scrollbar__wrap::-webkit-scrollbar {
		display: none;
	}

	.el-scrollbar__wrap li:nth-of-type(1) .tab_tr {
		border-top: 1px solid #ddd;
		background-color: #ddd;
	}

	.tab_tr {
		height: 40px;
		border-bottom: 1px solid #ddd;
		line-height: 40px;
		/* display: flex; */
	}

	.text_org {
		color: #EB6100;
	}

	.container /deep/ tr td:nth-of-type(2) span {
		color: #22ac38;
	}

	.el-pagination__total {
		height: 33px !important;
		line-height: 33px !important;
	}

	.el-input--mini .el-input__inner {
		height: 33px;
	}

	.el-pagination__editor.el-input .el-input__inner {
		height: 33px;
	}

	.page_box {
		display: flex;
		justify-content: flex-end;
		margin-top: 30px;
	}

	.el-pagination .btn-prev {
		border: 1px solid #ccc;
		padding: 0;
		border-right: none;
		min-width: 33px;
		height: 33px;
		padding-top: 2px;
	}

	.el-pagination .btn-next {
		border: 1px solid #ccc;
		padding: 0;
		border-left: none;
		min-width: 33px;
		height: 33px;
		padding-top: 2px;
	}

	.el-pager li {
		border: 1px solid #ccc;
		padding: 0;
		border-right: none;
		min-width: 33px;
		height: 33px;
		line-height: 33px;
	}

	.el-pager li:nth-last-of-type(1) {
		border-right: 1px solid #ccc;
	}

	.el-pager li.active {
		border: #4286f5 1px solid;
		background: #4286f5;
		color: #fff;
	}

	.btns {
		width: 72px;
		padding: 0;
	}

	.zzc {
		width: 100vw;
		height: 100vh;
		position: fixed;
		top: 0;
		left: 0;
		z-index: 204;
	}



	.loading-content {
		position: absolute;
		z-index: 2000;
		/* background-color: rgba(0, 0, 0, 0.8); */
		margin: 0;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		transition: opacity 0.3s;
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		/* width: 200px;
		height: 150px;
		border-radius: 10px; */
	}

	.loading-spinner {
		text-align: center;
	}

	.loading-spinner .circular {
		height: 42px;
		animation: loading-rotate 2s linear infinite;
	}

	.loading-spinner .path {
		animation: loading-dash 1.5s ease-in-out infinite;
		stroke-dasharray: 90, 150;
		stroke-dashoffset: 0;
		/* stroke- 2; */
		stroke: #000;
		stroke-linecap: round;
	}

	.loading-text {
		font-size: 14px;
		color: #000;
	}

	@keyframes loading-rotate {
		100% {
			transform: rotate(360deg);
		}
	}

	@keyframes loading-dash {
		0% {
			stroke-dasharray: 1, 200;
			stroke-dashoffset: 0;
		}

		50% {
			stroke-dasharray: 90, 150;
			stroke-dashoffset: -40px;
		}

		to {
			stroke-dasharray: 90, 150;
			stroke-dashoffset: -120px;
		}
	}





	.btns .iconfont {
		font-size: 10px;
		transition: all .3s;
		transform: rotateZ(0deg);
		line-height: 26px;
	}



	td,
	th {
		font-size: 14px;
		color: #333;
		/* line-height: 22px; */
		padding: 10px;
		border-top: 0;
		border-bottom: 1px solid #eee;
	}



	.modal {
		position: absolute;
	}

	.modal-dialog {
		height: 97%;
	}

	.modal-header {
		position: sticky;
		top: 0;
		z-index: 50;
	}

	.modal-content {
		/* width: 85%; */
		margin: 0 auto;
		max-height: 100%;
		/* height: 65vh; */
		/* overflow-y: scroll; */
	}

	.cent {
		width: 100%;
		align-items: center;
	}
</style>
